home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / LinkSpcB.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  4.0 KB  |  183 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: LinkSpcB.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODBaseLinkSpec_xh
  18. #define SOM_ODBaseLinkSpec_xh
  19.  
  20. class ODBaseLinkSpec;
  21.  
  22. #define ODBaseLinkSpec_MajorVersion 1
  23. #define ODBaseLinkSpec_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODBaseLinkSpec_API
  35. #define ODBaseLinkSpec_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODBaseLinkSpec;
  50. class ODStorageUnit;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODBaseLinkSpecCClassData ODBaseLinkSpecClassData
  58. #define ODBaseLinkSpecNewClass(major,minor) somNewVersionedClassReference(ODBaseLinkSpec,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODBaseLinkSpecMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODBaseLinkSpec class object, and the methods it introduces. */
  69. SOMEXTERN struct ODBaseLinkSpecClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken WriteLinkSpec;
  79.     somMToken ReadLinkSpec;
  80.     somMToken reserved1;
  81.     somMToken reserved2;
  82.     somMToken reserved3;
  83.     somMToken reserved4;
  84. } SOMDLINK ODBaseLinkSpecClassData;
  85.  
  86. #if PRAGMA_ALIGN_SUPPORTED
  87. #  pragma options align=reset
  88. #endif
  89.  
  90. #if !defined(ODBaseLinkSpec_Class_Source) && !defined(SOM_Module_linkspcb_Source)
  91. #if PRAGMA_IMPORT_SUPPORTED
  92. #pragma import list ODBaseLinkSpecClassData
  93. #endif
  94. #endif
  95.  
  96.  
  97. /*
  98.  * -- Typedefs and inline method declarations for left path inherited methods
  99.  * -- are omitted because this compilation had -museinheritedmethods in effect
  100.  */
  101.  
  102.  
  103. /*
  104.  * -- Typedefs for ODBaseLinkSpec Method Procedures
  105.  */
  106. SOMEXTERN {
  107. typedef void   (* SOMLINK somTD_ODBaseLinkSpec_WriteLinkSpec)(ODBaseLinkSpec *somSelf, Environment *ev,
  108.         ODStorageUnit* su);
  109. typedef void   (* SOMLINK somTD_ODBaseLinkSpec_ReadLinkSpec)(ODBaseLinkSpec *somSelf, Environment *ev,
  110.         ODStorageUnit* su);
  111. }
  112.  
  113. #endif /* ODBaseLinkSpec_API */
  114.  
  115.  
  116. /*
  117.  * -- This emitter treats Method Tokens as Thunks by default.
  118.  * -- Use the sc modifier "nothunks" to change this default
  119.  */
  120. #undef somresolve_
  121. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  122.  
  123. /*
  124.  * -- The C++ Wrapper Class for ODBaseLinkSpec
  125.  */
  126. class ODBaseLinkSpec : public ODObject
  127. {
  128. public:
  129.  
  130. // ODBaseLinkSpec::new registers use of the class object, and then uses somNew
  131. // to allocate memory and load the object method table pointer. 
  132. void *operator new(size_t size)
  133. {
  134.     SOM_IgnoreWarning(size);
  135.     // Allocate memory using the default allocator for ODBaseLinkSpec, and
  136.     // clear mem & set method table pointer, call basic initialization
  137. #ifdef SOMCHKNULL
  138.     void * __somResult = (void *)
  139.       somNewObject(ODBaseLinkSpec);
  140.     SOMCHKNULL(__somResult);
  141.     return __somResult;
  142. #else
  143.     return (void*) somNewObject(ODBaseLinkSpec);
  144. #endif
  145. }
  146.  
  147. // ODBaseLinkSpec::delete uses the default deallocator for the object's class.
  148. void operator delete(void * obj)
  149. {
  150.     if (obj) {
  151.         SOM_Resolve(obj,SOMObject,somFree)
  152.            ( (SOMObject*) obj );
  153.     }
  154. }
  155.  
  156. /* method: WriteLinkSpec */
  157. void   WriteLinkSpec(Environment *ev,
  158.         ODStorageUnit* su)
  159. {
  160.    SOM_ResolveD(this,ODBaseLinkSpec,ODBaseLinkSpec,WriteLinkSpec)
  161.     (this,ev,su);
  162. #ifdef SOMCHKEXCEPT
  163.       SOMCHKEXCEPT;
  164. #endif
  165. }
  166.  
  167. /* method: ReadLinkSpec */
  168. void   ReadLinkSpec(Environment *ev,
  169.         ODStorageUnit* su)
  170. {
  171.    SOM_ResolveD(this,ODBaseLinkSpec,ODBaseLinkSpec,ReadLinkSpec)
  172.     (this,ev,su);
  173. #ifdef SOMCHKEXCEPT
  174.       SOMCHKEXCEPT;
  175. #endif
  176. }
  177.  
  178. };   /* ODBaseLinkSpec */
  179.  
  180.  
  181.  
  182. #endif       /* SOM_ODBaseLinkSpec_xh */
  183.